//
//  MyApplication.m
//  MoeFM
//
//  Created by miyang on 14-11-14.
//  Copyright (c) 2014年 StraightJet. All rights reserved.
//

#import "MyApplication.h"
#import "PlayerViewController.h"

@implementation MyApplication

- (BOOL)canBecomeFirstResponder
{
    return YES;
}

- (void)remoteControlReceivedWithEvent:(UIEvent *)event
{
    switch (event.subtype) {
        case UIEventSubtypeRemoteControlPlay:
            [[PlayerViewController sharPlayer].audioPlayer resume];
            break;
        case UIEventSubtypeRemoteControlPause:
            [[PlayerViewController sharPlayer].audioPlayer pause];
            break;
        case UIEventSubtypeRemoteControlStop:
            [[PlayerViewController sharPlayer].audioPlayer stop];
            break;
            case UIEventSubtypeRemoteControlNextTrack:
            [[PlayerViewController sharPlayer] nextBtn];
            break;
        default:
            break;
    }
}

@end
